<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>IDA SDK: Debugger memory functions for UI</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">IDA SDK
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="files.html"><span>Header&#160;Files</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Debugger memory functions for UI<div class="ingroups"><a class="el" href="group__dbg__funcs.html">Debugger functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Inspect debugged process memory. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad1e4d0ddfde977a944d161f61742ef3d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> void <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__mem.html#gad1e4d0ddfde977a944d161f61742ef3d">set_dbgmem_source</a> (range_t *(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *dbg_get_memory_config)(int *n), int(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *memory_read)(<a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> ea, void *buffer, int size), int(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *memory_write)(<a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> ea, const void *buffer, int size))</td></tr>
<tr class="memdesc:gad1e4d0ddfde977a944d161f61742ef3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the memory information source for IDA kernel.  <a href="#gad1e4d0ddfde977a944d161f61742ef3d">More...</a><br /></td></tr>
<tr class="separator:gad1e4d0ddfde977a944d161f61742ef3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeb1edb73becff1b8483d32b3d0ef156d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> void <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__mem.html#gaeb1edb73becff1b8483d32b3d0ef156d">invalidate_dbgmem_config</a> (void)</td></tr>
<tr class="memdesc:gaeb1edb73becff1b8483d32b3d0ef156d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Invalidate the debugged process memory configuration.  <a href="#gaeb1edb73becff1b8483d32b3d0ef156d">More...</a><br /></td></tr>
<tr class="separator:gaeb1edb73becff1b8483d32b3d0ef156d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf7dc084fa0edb1ea55add52947d7dcfd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> void <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__mem.html#gaf7dc084fa0edb1ea55add52947d7dcfd">invalidate_dbgmem_contents</a> (<a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> ea, <a class="el" href="pro_8h.html#adbc570541d9f9a0c4489f9f1fe5f5699">asize_t</a> size)</td></tr>
<tr class="memdesc:gaf7dc084fa0edb1ea55add52947d7dcfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Invalidate the debugged process memory contents.  <a href="#gaf7dc084fa0edb1ea55add52947d7dcfd">More...</a><br /></td></tr>
<tr class="separator:gaf7dc084fa0edb1ea55add52947d7dcfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga065350680be8f3de3699534c292616c7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga065350680be8f3de3699534c292616c7"></a>
<a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> bool <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__mem.html#ga065350680be8f3de3699534c292616c7">is_debugger_on</a> (void)</td></tr>
<tr class="memdesc:ga065350680be8f3de3699534c292616c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the debugger currently running? <br /></td></tr>
<tr class="separator:ga065350680be8f3de3699534c292616c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae28d6f9d0a96fb5b4ae115c5f0d72c1a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae28d6f9d0a96fb5b4ae115c5f0d72c1a"></a>
<a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> bool <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__mem.html#gae28d6f9d0a96fb5b4ae115c5f0d72c1a">is_debugger_memory</a> (<a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> ea)</td></tr>
<tr class="memdesc:gae28d6f9d0a96fb5b4ae115c5f0d72c1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the address mapped to debugger memory? <br /></td></tr>
<tr class="separator:gae28d6f9d0a96fb5b4ae115c5f0d72c1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gad1e4d0ddfde977a944d161f61742ef3d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> void <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> set_dbgmem_source </td>
          <td>(</td>
          <td class="paramtype">range_t *(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *)(int *n)&#160;</td>
          <td class="paramname"><em>dbg_get_memory_config</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *)(<a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> ea, void *buffer, int size)&#160;</td>
          <td class="paramname"><em>memory_read</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *)(<a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> ea, const void *buffer, int size)&#160;</td>
          <td class="paramname"><em>memory_write</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the memory information source for IDA kernel. </p>
<p>This function allows the kernel to use information coming from somewhere other than the database (from the debugger, for example) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbg_get_memory_config</td><td>returns current memory configuration in the dynamic memory allocated by <a class="el" href="pro_8h.html#a2806c6575b58eb42bb0d2b96f92fc39b" title="System independent malloc. ">qalloc()</a>. The kernel will <a class="el" href="pro_8h.html#a69f9c35c61878b9b72795fa0f47afa26" title="System independent free. ">qfree()</a> it automatically. If this argument is NULL, then the debugged process memory is not used.<ul>
<li>n: number of ::range_t elements in the answer </li>
</ul>
</td></tr>
    <tr><td class="paramname">memory_read</td><td>read bytes from the debugged process memory </td></tr>
    <tr><td class="paramname">memory_write</td><td>write bytes to the debugged process memory (don't forget to call <a class="el" href="group__dbg__funcs__mem.html#gaf7dc084fa0edb1ea55add52947d7dcfd" title="Invalidate the debugged process memory contents. ">invalidate_dbgmem_contents()</a> from it) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaeb1edb73becff1b8483d32b3d0ef156d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> void <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> invalidate_dbgmem_config </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Invalidate the debugged process memory configuration. </p>
<p>Call this function if the debugged process might have changed its memory layout (allocated more memory, for example) </p>

</div>
</div>
<a class="anchor" id="gaf7dc084fa0edb1ea55add52947d7dcfd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> void <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> invalidate_dbgmem_contents </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a>&#160;</td>
          <td class="paramname"><em>ea</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pro_8h.html#adbc570541d9f9a0c4489f9f1fe5f5699">asize_t</a>&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Invalidate the debugged process memory contents. </p>
<p>Call this function each time the process has been stopped or the process memory is modified. If ea == <a class="el" href="pro_8h.html#a63a7c1cde5fb0cf0d0023d55c742dd4f" title="this value is used for &#39;bad address&#39; ">BADADDR</a>, then the whole memory contents will be invalidated </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
